/**
 * Created by xyang on 2022/5/30.
 */

import { constants } from "fs"


export function getIcErrorMessage (code) {
  if (!code) {
    return 'code is empty!'
  }
  /*   const routerMap = {
      CMSAutoCreate: '/cms-auto-create',
      AutoCreate: '/auto-create',
    } */
  var msg = ''
  const head = ''
  switch (code) {
    case 2:
      msg = '请重新放卡!'
      break
    case -401:
      msg = '卡操作频繁或认证有误, 无效卡！'
      break
    case -222:
      msg = '密码装载错误！'
      break
    case 3:
      msg = '防冲突出错'
      break
    case -3:
      msg = '请重新放卡！'
      break
    default:
      msg = '未知的卡状态， code：' + code
  }

  return head + msg
}